#include "grid.h"
#include <vector>
#include <QDebug>
#include <qfont.h>
grid::grid(int x,int y,int type){
    this -> posx = x;
    this -> posy = y;
    this -> type = type;
    this -> marked = false;
    this -> setFixedSize(40,40);
    if(type == 1) this -> nowtype = 1;
    else this-> nowtype = 0;
    finished = false;
}
void grid::mouseDoubleClickEvent(QMouseEvent * e){
    if(e->button() == Qt::RightButton){

        if(!marked){
            marked = true;
            QFont font;
            font.setPointSize(20);
            this->setFont(font);
            this->setText("★");

        }
        else{
            marked = false;
            this->setText("");
        }
        emit this->change_num();
    }

};
